<template>
	<view class="design-item" @click="click">
		<view class="design-item-left">
			<image :src="item.image" mode="aspectFill"></image>
			<view class="design-type">{{item.code}}</view>
		</view>
		<view class="design-item-right">
			<view class="design-name">{{item.name}}</view>
			<view class="design-style">擅长风格：{{item.style_name}}</view>
			<view class="design-des">{{item.brief}}</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			item: {
				type: Object,
				default () {
					return {}
				}
			}
		},
		data() {
			return {
				
			};
		},
		methods: {
			click(){
				this.$emit('click')
			}
		}
	}
</script>

<style lang="scss">
	.design-item{
		display: flex;
		align-items: flex-start;
		margin-bottom: 60rpx;
		.design-item-left{
			width: 198rpx;
			height: 264rpx;
			position: relative;
			border-radius: 8rpx 8rpx 8rpx 0;
			overflow: hidden;
			image{
				width: 198rpx;
				height: 264rpx;
				border-radius: 8rpx 8rpx 8rpx 0;
			}
			.design-type{
				position: absolute;
				bottom: 0;
				left: 0;
				right: 0;
				background:rgba(20,20,20,1);
				border-radius: 8rpx 0rpx 8rpx 0px;
				text-align: center;
				height: 48rpx;
				line-height: 48rpx;
				color: #FFF;
				white-space: nowrap;
				overflow: hidden;
				text-overflow: ellipsis;
				font-size: 22rpx;
			}
		}
		.design-item-right{
			flex: 1;
			min-width: 0;
			margin-left: 30rpx;
			.design-name{
				color: #141414;
				font-size: 32rpx;
				margin-top: 20rpx;
				font-weight: bold;
			}
			.design-style{
				font-size: 24rpx;
				color: #757575;
				margin-top: 20rpx;
			}
			.design-des{
				font-size: 24rpx;
				color: #8F8F8F;
				line-height: 42rpx;
				margin-top: 20rpx;
				display: -webkit-box;
				-webkit-line-clamp: 3;
				-webkit-box-orient: vertical;
				overflow: hidden;
			}
		}
	}
</style>
